<template>
  <div id="home" >
    <vue-particles
      color="#dedede"
      :particleOpacity="0.7"
      :particlesNumber="40"
      shapeType="star"
      :particleSize="4"
      linesColor="#FFFFFF"
      :linesWidth="2"
      :lineLinked="true"
      :lineOpacity="0.4"
      :linesDistance="150"
      :moveSpeed="3"
      :hoverEffect="true"
      hoverMode="grab"
      :clickEffect="true"
      clickMode="push"
      class="cash"
    >
    </vue-particles>
    <div class="header">
      <div class="nav-item">WORKSPACE
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-renwu"></use>
        </svg>
      </div>
      <div class="nav-item">Manage workspace
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-xinxi"></use>
        </svg>
      </div>
      <div class="nav-item">Back
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-faxian"></use>
        </svg>
      </div>
      <div class="nav-item">Homepage
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-shouye"></use>
        </svg>
      </div>
    </div>
    <div class="main">
      <div id="app" >
        <div style="display: flex; width: 100%; height: 100%">
          <div style="width: 20%">
            <el-aside width="100%" style="background-color: rgb(233, 241, 246)">
              <el-menu :router=true :default-active="$route.name" unique-opened="true">

              </el-menu>
            </el-aside>
          </div>
          <div style="width: 80%">
            <router-view></router-view>
          </div>
        </div>
      </div>
      <div class="form">
        <input type="text" placeholder="POST" />
        <div class="button">
          <button @click="goToGetDemo">get</button>
          <button @click="goToPostDemo">post</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  created() {},
  methods: {
    goToGetDemo() {
      this.$router.push('get');
    },
    goToPostDemo() {
      this.$router.push('post');
    }
  }
};
</script>
<style>
ul,
li {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: 25px;
}
#home {
  width: 100vw;
  height: 100vh;
  background: url("../assets/view2.jpg") no-repeat;
  background-size: cover;
  background-position: left;
  overflow: hidden;
  opacity:0.8;
  font-family: FZShuTi;
  font-size: 35px;
}
.cash {
  position:fixed;
  top:180px;
  width:100%;
}
.header {
  height: 50px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-item {
  height: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px 1px #ffb6c1;
  cursor: pointer;
}

.nav-item:active,

button:active{
  background-color: lightblue;
  color: #ffffff;
}

.title:active ~ .lt-menu {
  display: block;
}

.main {
  width: 100%;
  height: 100%;
  position: relative;
}

.form {
  /*width: 400px;*/
  /*display: flex;*/
  /*flex-direction: column;*/
  /*position: absolute;*/
  /*left: 50%;*/
  /*top:50%;*/
  /*transform: translate(-50%,-50%);*/
  width: 700px;
  height: 400px;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 50%;
  top:50%;
  transform: translate(-50%,-50%);
  background-color:rgba(255,255,255,0.7);
  margin: -50px 0px 66px 0px;
}
input {
  height: 50px;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px 1px #ffb6c1;
  margin-bottom: 30px;
  width: 400px;
  font-family: FZShuTi;
  font-size: 30px;
}

button{
  height: 50px;
  border: 1px solid #fff;
  margin-bottom: 30px;
  width: 150px;
  cursor: pointer;
  background-color: #ffffff;
  font-family: FZShuTi;
  font-size: 30px;
}

.form div{
  display: flex;
  align-items: center;
  justify-content: space-between;/*弹性布局*/
}
#app {
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: left;
  overflow: hidden;
  opacity:0.8;
  position: absolute;
  display: flex;
  position: absolute;
  justify-content: center;
  left: 0;
  top: 0;
  overflow: auto;
}
</style>
